﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="salesReport.aspx.cs" Inherits="Admin_salesReport" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>销售报表统计</title>
    
    
    <style type="text/css">
        .divContent
        {
            margin-left:20px;
            margin-top:15px;
            font-size:14px;
        }
        a:link { text-decoration: none;color: #0000ff;}
        a:active { text-decoration:blink; color: #ff0000;}
        a:hover {  text-decoration:underline; color: #ff0000;} 
        a:visited { text-decoration: none;color: #0000ff;}
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div>
     
        <div style="margin: 20px 0px 5px 300px; font-size:20px; font-weight:bold;">
            销售报表统计 
        </div> 
        <div style="margin:15px 0px 5px 10px; font-size:13px;">
            <span>开始日期： <input style="width:140px; height:14px;" name="startDate" id="startDate" type="text"    onclick="calendar()" /></span>
            <span style="margin-left:20px;">结束日期： <input style="width:140px; height:14px;" name="endDate" id="endDate" type="text"     onclick="calendar()" /></span>
            
            
        </div>  
        <div class="divContent">
            <a   href="javascript:Download(1);" > 已付款（未发货）的订单 </a>            
        </div>
        <div class="divContent">
            <a   href="javascript:Download(2);" > 已发货订单 </a>
        </div> 
    </div>
    </form>
    <script language="javascript" type="text/javascript" src="js/calendar.js"  > </script>
    <script language="javascript" type="text/javascript" src="js/u-function.js"  > </script>
    <script language="javascript" type="text/javascript">
        window.onload=function()
        {
            document.getElementById("startDate").value = GetDateString();
            document.getElementById("endDate").value = GetDateString();
        };
        function Download(type)
        {
            var startDate = document.getElementById("startDate").value;
            var endDate = document.getElementById("endDate").value;
                       
            var dtStart = ParseToDate(startDate);
            var dtEnd = ParseToDate(endDate);
        
            if(dtEnd<dtStart)
            {
                alert("结束日期不能早于开始日期！");
                return ;
            }
            window.open("ReportDownload.aspx?type=" + type +"&start=" + startDate + "&end="+endDate);
        }
    </script>
</body>
</html>
